package org.black.phoneUtility.app.activity;

import org.black.phoneUtility.R;
import org.black.phoneUtility.app.fragment.RestoreFileExploreFragment;

import android.app.Activity;
import android.app.Fragment;
import android.app.FragmentManager;
import android.content.Intent;
import android.os.Bundle;

public class RestoreFileExploreActivity extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		getActionBar().setDisplayHomeAsUpEnabled(true);

		setContentView(R.layout.phone_utility_restore_file_explorer_main);
		FragmentManager fragmentManager = getFragmentManager();
		Fragment fragment = new RestoreFileExploreFragment();

		Intent intent = getIntent();
		Bundle bundle = intent.getExtras();
		fragment.setArguments(bundle);

		fragmentManager
				.beginTransaction()
				.replace(
						R.id.phone_utility_restore_file_explorer_main_content_frame,
						fragment, RestoreFileExploreFragment.TAG).commit();
	}

	@Override
	public void onBackPressed() {
		this.finish();
		this.overridePendingTransition(R.animator.left_slide_enter,
				R.animator.left_slide_exit);
	}
}
